package com.zbhk.qc.controller;

import com.zbhk.qc.dto.BaseResponseEntity;
import com.zbhk.qc.dto.BgLoginOutput;
import com.zbhk.qc.dto.LoginInput;
import com.zbhk.qc.dto.VdAdClickVO;
import com.zbhk.qc.service.VdAdClickService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;

@Slf4j
@RestController("VdAdClickController")
@RequestMapping(value = "/vdAdClick")
@RequiredArgsConstructor
@Api(tags = "广告点击表")
public class VdAdClickController {

    @Autowired
    private VdAdClickService vdAdClickService;

    @ApiOperation(value = "公众号文章邀请链接", notes = "根据文章id、用户id返回链接", produces = "application/json")
    @GetMapping("/getAdUrl")
    public BaseResponseEntity<VdAdClickVO> getAdUrl(Long paId, Long userId, HttpServletRequest request) {
        return vdAdClickService.getAdUrl(paId, userId);
    }

}
